<template>
    <div class="container">
        <el-button class="btn" v-if="!isShow" type="primary" @click="isShow = true">显示</el-button>
        <el-button class="btn" v-else type="warning" @click="isShow = false">隐藏</el-button>
        <div class="box">
            <div class="piece" :class="isShow ? 'piece_show' : ''" v-for="item in 400" :key="item"></div>
        </div>
    </div>
</template>
<script lang="ts" setup>
import { ref } from "vue";
let isShow = ref(true);
</script>
<style scoped lang="scss" src="./fragment.scss"></style>
